﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Frw.Patterns.CommandPattern
{
    public class Command<T> : ICommand
    {
        private T target;
        private Action<T> command;

        public Command(T target, Action<T> command)
        {
            this.target = target;
            this.command = command;
        }

        public void Execute()
        {
            command(target);
        }
    }
}
